% Converts the four input indices into J(x) index
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% function jIndexTable =
% toJIndexTable(G,numSamples,varargin);
%  
%   This function will calculate the wandering distance table for input
%   graph G by using a Monte Carlo method.  This effectively is a brute
%   force method for calculating the wandering distance by performing many
%   random walks and averaging the results for each possible vertex
%   combination
%
%   INPUTS:     G - adjacency matrix for graph G
%               numSamples - number of random samples to average
%               
%   OUTPUTS:    wanderingDistanceTable - table of wandering distance values            
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function jIndexTable = toJIndexTable(eccentricitiesPrime,eccentricitiesBarPrime,wanderingEccentricitiesPrime,wanderingEccentricitiesBarPrime,varargin);

% A few variable initializations
[temp indexSize]=size(eccentricitiesPrime);
jIndexTable = zeros(1,indexSize);

% Here are declarations for a,b,c,d.  Change values for them here:
a = 0.15;
b = 0.3;
c = 0.15;
d = 0.4;

for x = 1:indexSize
    jIndexTable(x) = (a^2)*eccentricitiesPrime(x) + (b^2)*eccentricitiesBarPrime(x) + (c^2)*wanderingEccentricitiesPrime(x) + (d^2)*wanderingEccentricitiesBarPrime(x);
end;
